//
//  DebugItemManager.h
//  YK_DebugManager
//
//  Created by edward on 2021/1/12.
//

#import <Foundation/Foundation.h>

@class UIImage;
@class UIViewController;
NS_ASSUME_NONNULL_BEGIN

@interface DebugItemManager : NSObject


///内置item
@property(nonatomic,strong,readonly) NSArray *mainItems;
///自定义item
@property(nonatomic,strong,readonly) NSArray *customItems;
///头部开关item
@property(nonatomic,strong,readonly) NSMutableArray<NSDictionary *> *switchItems;

/// 单例
+ (instancetype)sharedInstance;



/// 添加自定义item
/// @param itemImage  item的图案
/// @param itemTitle item的名称
/// @param itemClickBlock  item的点击回调
- (void)addCustomItem:(UIImage * _Nonnull)itemImage itemTitle:(NSString *)itemTitle itemClickBlock:(void(^)(void(^callBack)(UIViewController *viewController, NSInteger type, BOOL animated),void(^dissMissMain)(void)))itemClickBlock;

/// 获取主要item的内容
/// @param indexPath 索引
/// @param detailBlock 内容回调
- (void)getItemDetail:(NSIndexPath *)indexPath detailBlock:(void(^)(UIImage *itemImage,NSString *itemTitle,void(^itemClickBlock)(void(^callBack)(UIViewController *viewController, NSInteger type, BOOL animated),void(^dissMissMain)(void))))detailBlock;

/// 添加顶部开关item
/// @param switchName 开关名称
/// @param switchItemNotificationName 开关缓存名称
/// @param itemClickBlock 点击item响应是否开关
- (void)addSwitchItemDetail:(NSString * _Nonnull)switchName switchItemNotificationName:(NSString * _Nonnull)switchItemNotificationName itemClickBlock:(BOOL(^)(BOOL result))itemClickBlock;

/// 获取开关内容
/// @param indexPath 索引
/// @param detailBlock 内容回调
- (void)getSwitchItemDetail:(NSIndexPath *)indexPath detailBlock:(void(^)(NSString *switchItemName,NSString *switchItemNotificationName,BOOL(^itemBlock)(BOOL result)))detailBlock;
@end

NS_ASSUME_NONNULL_END
